#ifndef __BSP_ADC_H
#define __BSP_ADC_H

#include "gd32f30x_adc.h"

// 电机相关 
#define M0_W_CURRENT ADC_IDATA0(ADC0)
#define M0_V_CURRENT ADC_IDATA1(ADC0)
#define M0_U_CURRENT ADC_IDATA2(ADC0)

#define M1_W_CURRENT ADC_IDATA0(ADC1)
#define M1_V_CURRENT ADC_IDATA1(ADC1)
#define M1_U_CURRENT ADC_IDATA2(ADC1)

#define M2_W_CURRENT ADC_IDATA0(ADC0)
#define M2_V_CURRENT ADC_IDATA1(ADC1)

// 母线电压
#define BUS_VOLTAGE adc0_buff[0]

// 
extern uint16_t adc0_buff[1];
extern void bsp_adc_init(void);

#endif
